import React from 'react';

import './index.less';


import {
    render
} from '../../../../../hrpub/common/frame';

import ViewContractAction from '../../actions/viewContract';
import RowHandle from '../../actions/rowHandle';

import {
    base
} from 'nc-lightapp-front';

const {
    NCModal,
    NCTable
} = base;

const {
    Header,
    Body,
    Footer
} = NCModal;

export default render({
    actions: {
        vcAct: ViewContractAction,
        rowAct: RowHandle
    }
})(({props, state, action}) => {

    const {emp} = props;

    return (
        <NCModal
            show={emp.viewContractModalVisible}
            onHide={action.vcAct.closeModal('viewContractModalVisible')}
            size="lg"
        >
            <Header
                closeButton={true}
            >
                {emp.language['gx6008-000083']/** 查看合同和协议 */}
            </Header>
            <Body>
                <NCTable
                    columns={action.vcAct.processTableInfo(emp.viewContractTableInfo)}
                    data={action.vcAct.processTableData(emp.viewContractTableData)}
                    scroll={{
                        x: true,
                        y: true
                    }}
                />
            </Body>
        </NCModal>
    );

});